package com.wzdigit.wms.raw.mapper.gdn.report;

import com.wzdigit.framework.orm.mybatis.MyBatisRepository;
import com.wzdigit.wms.basic.client.request.outstock.CancelPickMaterialRequest;
import com.wzdigit.wms.basic.client.request.transfer.SearchGdnHeaderRequest;
import com.wzdigit.wms.basic.client.response.transfer.GdnHeaderListResponse;
import com.wzdigit.wms.common.utils.BigDecimalUtil;
import com.wzdigit.wms.raw.client.response.gdn.report.CancelGdnRepostGoods;
import com.wzdigit.wms.raw.client.response.gdn.report.CancelGdnResponse;
import com.wzdigit.wms.raw.client.response.gdn.report.GdnExportExt;
import com.wzdigit.wms.raw.client.response.gdn.report.GdnHeaderListNewResponse;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 出库报表Mapper
 * Created by zyf on 2021/7/26 9:27
 */
@MyBatisRepository
public interface GdnReportMapper {
    List<CancelGdnResponse> selectCacncelGdn(@Param("gdnHeaderIds") List<BigDecimal> gdnHeaderIds);

    List<CancelPickMaterialRequest> selectCacncelGdnGoods(@Param("gdnHeaderIds") List<BigDecimal> gdnHeaderIds);

    int updateCacncelGdnHeader(@Param("gdnHeaderIds") List<BigDecimal> gdnHeaderIds,
                               @Param("status") Integer status,
                               @Param("loginName") String loginName,
                               @Param("modifyDate") Date modifyDate);

    List<GdnHeaderListNewResponse> selectAllRawNew(
            @Param("dto")SearchGdnHeaderRequest dto,
            @Param("gdnDtlStatusList")List<Integer> gdnDtlStatusList,
            @Param("shipDateStart")Date shipDateStart, @Param("shipDateEnd")Date shipDateEnd,
            @Param("approvedDateStart")Date approvedDateStart, @Param("approvedDateEnd")Date approvedDateEnd,
            @Param("gdnTypeList")List<String> gdnTypeList);

    List<String> selectDistinctWareHouseNew(@Param("gdnHeaderId") BigDecimal gdnHeaderId);

    //出库单报表导出
    List<GdnExportExt> exportGdn(@Param("dto") SearchGdnHeaderRequest dto,
                                 @Param("gdnDtlStatusList")List<Integer> gdnDtlStatusList,
                                 @Param("shipDateStart")Date shipDateStart, @Param("shipDateEnd")Date shipDateEnd,
                                 @Param("approvedDateStart")Date approvedDateStart, @Param("approvedDateEnd")Date approvedDateEnd,
                                 @Param("gdnTypeList")List<String> gdnTypeList);

}
